/**
 * This script contains some code from CurvyCorners,
 *    Copyright (c) 2006 Cameron Cooke
 *    By: Cameron Cooke and Tim Hutchison.
 *    Website: http://www.curvycorners.net
 * 
 * This library is free software; you can redistribute
 * it and/or modify it under the terms of the GNU
 * Lesser General Public License as published by the
 * Free Software Foundation; either version 2.1 of the
 * License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will
 * be useful, but WITHOUT ANY WARRANTY; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE. See the GNU Lesser General Public
 * License for more details.
 * 
 * You should have received a copy of the GNU Lesser
 * General Public License along with this library;
 * Inc., 59 Temple Place, Suite 330, Boston,
 * MA 02111-1307 USA
 */
/*
var Hex = new Class(
{
	initialize: function(i)
	{
		base  = i / 16;
		rem   = i % 16;
		base  = base - (rem / 16);
		baseS = this.makeHex(base);
		remS  = this.makeHex(rem);
		return new String(baseS + '' + remS);
	},
	
	makeHex: function(x)
	{
	    if((x >= 0) && (x <= 9))
	        return x;
	    else
	    {
	        switch(x)
	        {
	            case 10: return "A";
	            case 11: return "B";
	            case 12: return "C";
	            case 13: return "D";
	            case 14: return "E";
	            case 15: return "F";
	        }
	    }
	}
});
var Color = Color.extend(
{
	initialize: function(color, type)
	{
		if ($type(color) == 'string' && color.indexOf('rgb(') === 0)
		{
			color = color.substring(color.indexOf("(") + 1, color.indexOf(")")).split(", ");
			type = 'rgb';
		}
		return this.parent(color, type);
	},
	
	toString: function()
	{
		return '#' + new Hex(this[0]) + new Hex(this[1]) + new Hex(this[2]);
	}
});
*/

Color.implement(
{
	toString: function()
	{
		return '#' + new Hex(this[0]) + new Hex(this[1]) + new Hex(this[2]);
	}
});